package com.aspectj.aop.utils;

/**
 * desc   : 模版
 * author : chendaning
 * date   : 6/11/21
 */
public class ArrayUtils {
    public static String toString(String[] value){
        StringBuilder builder = new StringBuilder();
        builder.append("(");
        for (int i = 0; i < value.length; i++) {
            builder.append(value[i]);
            if(i != value.length - 1) {
                builder.append(",");
            }
        }
        builder.append(")");
        return builder.toString();
    }

    public static String toString(Object[] value){
        StringBuilder builder = new StringBuilder();
        builder.append("(");
        for (int i = 0; i < value.length; i++) {
            Object item = value[i];
            builder.append(item.toString());
            if(i != value.length - 1) {
                builder.append(",");
            }
        }
        builder.append(")");
        return builder.toString();
    }

}
